const fs = require('fs');
const path = require('path');
let fullPath = path.join(__dirname,'dirname');
fs.exists(fullPath,(b)=>{
    if(b){
        console.log('文件存在')
    }else{
        fs.mkdir(fullPath,(e)=>{
            if(e){
                throw new Error(e);
            }else{
                console.log('目录创建成功');
            }
        })
    }
})